package com.lanou.mapper;

import com.lanou.entity.ExchangeRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ExchangeRecordMapper {
    // 添加兑换记录
    int addRecord(ExchangeRecord record);

    // 查询用户兑换记录（关联商品信息）
    List<Map<String, Object>> getRecordsByUserId(@Param("userId") Integer userId);
}